package top.yokey.android.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;

import top.yokey.android.R;
import top.yokey.android.activity.MainActivity;
import top.yokey.android.base.App;

public class NotificationsFragment extends Fragment {

    private AppCompatTextView nicknameTextView;

    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View root = inflater.inflate(R.layout.fragment_notifications, container, false);
        //在Fragment中不可以直接使用findViewById函数 要使用view 类型的标识符的方法
        nicknameTextView = root.findViewById(R.id.nicknameTextView);
        //设置对应的属性值
        nicknameTextView.setText(App.get().getMemberBean().getMemberNickname());
        return root;

    }

}
